<template>
  <div>
      <div class="head">
      <van-icon class="arrow-left" name="arrow-left" @click="goBack" />
      <p class="title">设置</p>
    </div>
    <van-cell title="修改用户名" is-link />
      <van-cell title="修改密码" is-link />
      <br>
       <van-button type="primary" size="large" @click="out" >退出</van-button>
  </div>
</template>

<script>
export default {
  name:"Sets",
  methods:{
    goBack(){
        this.$router.back()
    },
    out(){
        localStorage.clear()
        setTimeout(() => {
            this.$router.push("/My")
        }, 500);
    }
  }
}
</script >

<style scoped>
.head {
  height: 45px;
  background-color: skyblue;
  text-align: center;
  line-height: 45px;
}
.arrow-left {
  float: left;
  margin: 1rem;
  color: blue;
}
.title {
  text-align: center;
  margin-right: 42px;
}
button {
  width: 20rem;
  height: 2.5rem;
  background: red;
  color: white;
  border: none;
  border-radius: 25px;
  margin-left: 1.2rem;
  margin-top: 1.5rem;
}
</style>